package cn.com.cifi.mars.constant;

import cn.com.cifi.mars.util.StrUtils;

/**
 * 货值预警督办待办岗位
 *
 */
public enum WarnPossitionTypeEnum {

	INFORMANT("informant","填报人"),
	SUPERVISE_BY("supervise_by","督办人"),
	HOST_BY("host_by","被督办人"),
	ASSISTANT_BY("assistant_by","协办人"),
	WARN_RECEIVE("warn_receive","预警待办接收人"),
	WARN_RECEIVE_GROUP("warn_receive_group","预警待办接收人-高管"),
	WARN_CONFIRM("warn_confirm","预警待办确认人"),
	HOST_BY_SD("host_by_sd","山东事业部被督办人"),
	ASSISTANT_BY_SD("assistant_by_sd","山东事业部协办人"),
	WARN_NOTITY("warn_notity","预警待办知会人"),
	THRESHOLD_VALUE("threshold_value","楼栋均价预警阙值"),
    ;

    private String key;
    private String value;

    WarnPossitionTypeEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }
    
    public static String getValueByKey(String key){
    	if(StrUtils.isEmpty(key)) {
    		return null;
    	}
        for(WarnPossitionTypeEnum eunm:WarnPossitionTypeEnum.values()){
            if(key.equals(eunm.getKey())){
                return eunm.getValue();
            }
        }
        return  null;
    }

}
